import state from "./state";
import {Loading} from '@/utils/Loading'
const matutaions = {
  /*[types.SET_USER_TYPE](state, type) {
    state.user.type = type
  },*/
  showLoading(state, type) {
    const loading = Loading.getInstance()
    loading.showLoading()

  },
  hideLoading(state, type) {
    const loading = Loading.getInstance()
    loading.hideLoading()
  },
  hideMask( state) {
    state.isShowMask = false
  },
  showMask(state) {
    state.isShowMask = true
  },

  setInsuranceApp (state, insuranceApp) {
    state.insuranceApp = insuranceApp
  },

  setIsVistor(state, isVistor) {
    state.isVistor = isVistor
  },

  setUserGrade( state, grade ) {
    state.userGrade = grade
  },
  // 保存那个地图搜索结果
  setSearchResult(state, result) {
    state.searchResult = result
  }
}

export default matutaions;
